package com.example.springbootjackson;

import com.example.springbootjackson.model.Order;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.util.ClassUtils;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.PostConstruct;
import java.util.Date;

@RestController
@SpringBootApplication
public class SpringbootJacksonApplication {

    public static void main(String[] args) {
        SpringApplication.run(SpringbootJacksonApplication.class, args);
    }

    @PostMapping("/p")
    public Order printOrder(){
        return Order.builder().createDate(new Date()).build();
    }

    @PostConstruct
    public void init(){
    }

}
